package com.example.demo.services;

import com.example.demo.entity.Wish;
import com.example.demo.exception.IndexException;
import com.example.demo.mapper.WishMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IndexServices {
    @Autowired
    WishMapper WishMapper;
    public void addWish(Wish wish){
        WishMapper.add(wish);
        if(wish.id == null){
            throw new IndexException(402,"添加失败");
        }
    }
    public void test(){
        System.out.println(111);
    }
}
